import { BaseEntity } from '../../base/entity/base';
import { Column, Entity, Index } from 'typeorm';

/**
 * 班级预约表
 */
@Entity('class_classappoint')
export class ClassClassAppointEntity extends BaseEntity {
  @Index()
  @Column({ comment: '班级ID' })
  classId: number;

  @Index()
  @Column({ comment: '学员ID' })
  studentId: number;

  @Column({
    comment: '预约状态',
    dict: ['待确认', '已预约', '已取消'],
    default: 0,
  })
  status: number;

  @Column({ comment: '预约时间', nullable: true })
  appointTime: Date;

  @Column({ comment: '取消时间', nullable: true })
  cancelTime: Date;

  @Column({ comment: '最后操作人员', nullable: true })
  lastOperator: number;

  @Column({ comment: '预约人员', nullable: true })
  appointOperator: number;

  @Column({ comment: '退班人员', nullable: true })
  exitOperator: number;

  @Column({ comment: '签到人员', nullable: true })
  signOperator: number;

  @Column({ comment: '签到状态', default: 0 })
  signStatus: number;
}
